bimodal blkback: Support multiple ring protocols.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 24 Jan 2007 10:38:17 +0000 (10:38 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 24 Jan 2007 10:38:17 +0000 (10:38 +0000)
commitd32128e96e84b8ce93bcf6ceccc4437a8e389ff7
tree6a76dbd61c6b162461f72520a0b7b3fc70070824
parent91421c3cf044dccace40b024b4f5ca4bad95c4ae
bimodal blkback: Support multiple ring protocols.

This is needed for 32-on-64 support.  Right now there are three
protocols: native, x86_32 and x86_64.  If needed it can be extended.

Interface changes (io/blkif.h)
 * Define the x86_32 and x86_64 structs additionally to the native
   version.
 * Add helper functions to convert them requests to native.

Backend changes:
 * Look at the "protocol" name of the frontend and switch ring
   handling accordingly.  If the protocol node isn't present it
   assumes native protocol.
 * As the request struct is copied anyway before being processed (for
   security reasons) it is converted to native at that point so most
   backend code doesn't need to know what the frontend speaks.
 * In case of blktap this is completely transparent to userspace, the
   kernel/userspace ring is always native no matter what the frontend
   speaks.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
linux-2.6-xen-sparse/drivers/xen/blkback/common.h
linux-2.6-xen-sparse/drivers/xen/blkback/interface.c
linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c
linux-2.6-xen-sparse/drivers/xen/blktap/common.h
linux-2.6-xen-sparse/drivers/xen/blktap/interface.c
linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c
linux-2.6-xen-sparse/include/xen/blkif.h [new file with mode: 0644]
xen/include/public/io/blkif.h